home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / gem / l_0399 / 370 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1.6 KB

  1. Date: Wed, 8 Jun 94 13:44 CDT
  2. From: ekl@sdf.lonestar.org (Evan K. Langlois)
  3. To: gem-list@world.std.com
  4. Subject: GEm Tip
  5. Precedence: bulk
  6.  
  7.  
  8. Here is a small tip for those of you still using standard RSC files for
  9. dialogs.  Some of you have wanted more color in your dialogs, but find you
  10. have to hack alot in the program code to adjust colors to be sure the
  11. dialog is readable in mono or lower-color modes.   
  12.  
  13. There is a little trick you can do to get all 16 colors in any dialog and
  14. have it perfectly readable in ALL modes.  And it looks fine in mono too!
  15. What you do is set the dialog background color to the opposite color
  16. that you want it, now set the SELECTED bit, but do NOT set the selectable
  17. bit.  The colors will inverse back to the original that you wanted in
  18. the first place.  Now save the RSC.   When you load it under MONO, normally,
  19. any color above 0 (WHITE) becomes black, giving you black on black, and
  20. you can't read it, but the background is SELECTED, so it inverts to white
  21. and you can read it like a normal dialog.
  22.  
  23. Buttons are a bit harder because they invert and your text and background
  24. colors can't be set separately, however, you can stack text of any color
  25. on top of a button of any color.  This allows you to set the attributes 
  26. for selected and selectability separately for the button, and then the
  27. above trick will work for the object.
  28.  
  29. Try it, you can get some really nice looking 16 color dialogs (actually
  30. 4 or 5 colors per dialog, but you can use all 16 in the program, finding
  31. a use for all 16 in one dialog is tough).   This works and your program
  32. doesn't have to do any fix-ups.  It should work in a window, or with
  33. form-do or with custom handlers.
  34.  
  35.